//
//  QMacro.h
//  QoilPublic
//
//  Created by 杨凯 on 16/7/1.
//  Copyright © 2016年 杨凯. All rights reserved.
//

#import <Foundation/Foundation.h>


#define WS(wSelf)  __weak __typeof(&*self)wSelf = self;

#ifdef DEBUG
#define CLog(format, ...) NSLog(format, ## __VA_ARGS__)
#else
#define CLog(format, ...)
#endif

#define StatusBarHeight     ([[UIApplication sharedApplication] statusBarFrame].size.height>20?34:0) // 适配iPhone x 底栏高度
#define kScreenWidth ([UIScreen mainScreen].bounds.size.width)
#define kScreenHeight (screenHeight == 812.0 ? screenHeight-34 : screenHeight)
#define screenHeight ([UIScreen mainScreen].bounds.size.height)
#define kStatusHeight ([[UIApplication sharedApplication] statusBarFrame].size.height)
#define kNavHeight (self.navigationController.navigationBar.frame.size.height)

#define Above_iOS8 ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0)

#define kCurrentVersion ([[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"])

#define ARRAY_INIT(NAME) - (NSMutableArray *)NAME { \
if (_##NAME == nil) { \
_##NAME = [[NSMutableArray alloc] init]; \
} \
return _##NAME; \
}

#define Ksize18 18

#define Ksize15 15

#define Ksize16 16

#define Ksize17 17

#define Ksize13 13

#define Ksize12 12

#define Ksize14 14



#define iphone4x_3_5 ([UIScreen mainScreen].bounds.size.height==480.0f || [UIScreen mainScreen].bounds.size.height==320.0f)

#define iphone5x_4_0 ([UIScreen mainScreen].bounds.size.height==568.0f || [UIScreen mainScreen].bounds.size.height==320.0f)

#define iphone6_4_7 ([UIScreen mainScreen].bounds.size.height==667.0f || [UIScreen mainScreen].bounds.size.height==375.0f)

#define iphone6Plus_5_5 ([UIScreen mainScreen].bounds.size.height==736.0f || [UIScreen mainScreen].bounds.size.height==414.0f)
#define iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125,2436), [[UIScreen mainScreen] currentMode].size) : NO)

#define kDevice_Is_iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)

static NSString * const kNotificationRegisterSuccess = @"kNotificationRegisterSuccess";//注册成功

static NSString * const kNotificationLoginSignup = @"kNotificationLoginSignup";//登录

static NSString * const kNotificationLoginSignOut = @"kNotificationLoginSignOut";//退出

static NSString * const kNotificationscrollsToTop = @"kNotificationscrollsToTop";//解决多个tableView置顶

static NSString * const kNotificationjudgeSuccess = @"kNotificationjudgeSuccess";//

static NSString * const kTopKey = @"kTopKey";//带的参数key

static NSString * const kNotificationTopUpMoneySuccess = @"kNotificationTopUpMoneySuccess";//充值成功

static NSString * const kNotificationMemberPaySuccess = @"kNotificationMemberPaySuccess";//会员支付成功

static NSString * const kNotificationKeyBoardShowA = @"kNotificationKeyBoardShowA";//自定义键盘展开

static NSString * const kNotificationKeyBoardNotShowA = @"kNotificationKeyBoardNotShowA";//自定义键盘收起

static NSString * const kNotificationKeyBoardShowB = @"kNotificationKeyBoardShowB";//自定义键盘展开

static NSString * const kNotificationKeyBoardNotShowB = @"kNotificationKeyBoardNotShowB";//自定义键盘收起

static NSString * const kNotificationShowData = @"kNotificationShowData";//查询记账本数据

static NSString * const kNotificationStarJudge = @"kNotificationStarJudge";//查询记账本数据

//static NSString * const kNotificationDetailPush = @"kNotificationDetailPush";//极光通知订单详情页面

static NSString * const kNotificationNoPayOrders = @"kNotificationNoPayOrders";//未支付订单的通知 // 所有界面都会通知

//杨凯
static NSString * const kNotificationAddInvoiceSuccess = @"kNotificationAddInvoiceSuccess";//添加发票成功返回时重新请求

static NSString * const kNotificationCouponSuccess = @"kNotificationCouponSuccess";//输入兑换券码成功后

static NSString * const kNotificationPointSignSuccess = @"kNotificationPointSignSuccess";//积分页面，签到成功

static NSString * const kNotificationReadMessage = @"kNotificationReadMessage";//标记为已读时通知消息界面刷新未读状态

static NSString * const kNotificationPushToAdVC = @"kNotificationPushToAdVC";//push到打开广告链接页面

static NSString * const kNotificationGoToPay = @"kNotificationGoToPay";//推送过来进完成订单列表支付时置scrollView显示完成订单

static NSString * const kNotificationCommentSuccess = @"CommentSuccessNotification";//推送过来进完成订单列表支付时置scrollView显示完成订单

static NSString * const kNotificationPaySuccess = @"PaySuccessNotification";//付款成功返回刷新已完成订单通知
//点击tabbar请求
static NSString * const kNotificationTabBar1 = @"kNotificationTabBar1";
static NSString * const kNotificationTabBar2 = @"kNotificationTabBar2";
static NSString * const kNotificationTabBar3 = @"kNotificationTabBar3";
static NSString * const kNotificationTabBar4 = @"kNotificationTabBar4";




static NSString * const showAlertBtnTitle = @"我已知晓";//请求失败

static NSString * const KpageSize = @"10";//一页的数量

//油岛科技
static NSString * const WXappID = @"wx698daba38ee761b1";
static NSString * const WXappSecret = @"3f92b976c6fbaa42f47cfe23116d2ed0";

//油岛石油
//static NSString * const WXappID = @"wxf5e16e56a9ab69b8";
//static NSString * const WXappSecret = @"fbc0dc301bf65e4a83d4e198f01ccebc";

static NSString * const QQappID = @"1105574558";

static NSString * const QQappSecret = @"KEY029s8Bu4nykyK1yM";

//static NSString * const UmengKey = @"57216c7f67e58ed08f003d4d";
//原来的友盟key:584635014544cb316b001a61
static NSString * const UmengKey = @"598a61785312dd8b7b000e45";

static NSString * const GDMapKey = @"60c1eefc88683bbd2cb3838500e9ccaf";

static NSString * const WXDescription = @"oilWXid";

static NSString *JappKey = @"1ae2c9066e3c4d457871d1d8";//极光key
static NSString *BuglyKey = @"742ad024b6";//bugly key
//static NSString *JappKey = @"995c21624b5379fc1e61c34f";//极光key

static NSString *Jchannel = @"Publish channel";

static BOOL JisProduction = YES;


static NSString * const paytopup = @"支付充值";

static NSString * const payorder = @"订单支付";

static NSInteger errCode = -1004;





